<!DOCTYPE html>
<html>
<head>
    <script>if (window !== top) top.location.replace(location.href);</script>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link href="/images/favicon.ico" rel="icon">
    <title>login</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <link rel="stylesheet" href="/css/style.css">

</head>
<body>
<div class="login-wrapper layui-anim layui-anim-scale layui-hide">
    <form class="layui-form" name="loginForm" method="post" th:action="${loginProcessUrl}">
        <h2>用户登录</h2>
        <div class="layui-form-item layui-input-icon-group">
            <i class="layui-icon layui-icon-username"></i>
            <input class="layui-input" name="username" placeholder="請輸入登錄賬號" autocomplete="off"
                   lay-verType="tips" lay-verify="required" required/>
        </div>
        <div class="layui-form-item layui-input-icon-group">
            <i class="layui-icon layui-icon-password"></i>
            <input class="layui-input" name="password" placeholder="請輸入登錄密碼" type="password"
                   lay-verType="tips" lay-verify="required" required/>
        </div>

        <div class="layui-form-item">

            <label class="layui-form-label" style="text-align: left;padding-left: 0;">用戶類型</label>
            <div class="layui-input-block">
                <input type="radio" name="userType" value="1" title="個人" checked>
                <input type="radio" name="userType" value="2" title="組織">
            </div>
        </div>
        <div class="layui-form-item">
            <button class="layui-btn layui-btn-fluid" type="submit">登錄</button>
        </div>

    </form>
    <p style="color: red" th:if="${param.error}">用戶名或密碼錯誤</p>
</div>
<div class="login-copyright">cas - v1.5.7</div>

<!-- js部分 -->
<script src="/layui/layui.js"></script>
<script>
    layui.use(['layer', 'form'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        $('.login-wrapper').removeClass('layui-hide');
    });
</script>
</body>
</html>